package com.example.modulethree.fragment

import android.util.Log
import com.example.modulethree.adapter.KotlinTestAdapter
import com.example.modulethree.delegate.KotlinTestFragmentDelegate
import com.example.modulethree.util.function.ClassFunTest
import com.example.modulethree.util.function.FunTest
import com.example.modulethree.util.function.double
import com.example.modulethree.util.function.toString1
import com.example.mvp.binder.BaseDataBinder
import com.example.mvp.fragment.BaseFragmentMVP


/**
 * Created by sun.li on 2018/6/28.
 * @author sun.li
 */
class KotlinMVPTestFragment : BaseFragmentMVP<KotlinTestFragmentDelegate>(){

    var data = arrayListOf<String>()

    override fun initDate() {
        for (i in 0..49) {
            data.add("item_$i")
        }
        val adapter = KotlinTestAdapter(activity,data)
        viewDelegate.setListAdapter(adapter)

        var index = double(10)
        Log.e("indexStr:",index.toString1())

        FunTest()
        FunTest(50)
        FunTest(55)
        FunTest(100,33)

        var foo = ClassFunTest().foo()
        ClassFunTest().foo1()
        ClassFunTest().foo2()
    }

    override fun bindEvenListener() {
    }

    override fun getDelegateClass(): Class<KotlinTestFragmentDelegate> {
        return KotlinTestFragmentDelegate::class.java
    }

    override fun getDataBinder(): BaseDataBinder<*, *>? {
        return null
    }


}